#include "precomp.h"
#include "Program.h"
#include "Application.h"

int Program::main(const std::vector<CL_String> &args){
	try{
		CL_SetupCore setup_core;
		CL_SetupDisplay setup_display;
		CL_SetupGL setup_gl;

		Application application;

		int app_return_value =  application.main(args);

		return app_return_value;
	}catch(CL_Exception &cl_exception){
		CL_ConsoleWindow console("Debug Console");
		CL_Console::write_line("Exception caught: " + cl_exception.get_message_and_stack_trace());
		console.display_close_message();

		return -1;
	}
}

CL_ClanApplication cl_app(&Program::main);